package com.jy.unkown;


import com.jy.common.BaseApplication;
import com.jy.unkown.videocache.HttpProxyCacheServer;

public class UnkownAdManager {
    private static HttpProxyCacheServer proxy;

    public static HttpProxyCacheServer getProxy() {
        if (proxy == null) {
//            proxy = new HttpProxyCacheServer(BaseApplication.getBaseApplication());
            proxy = new HttpProxyCacheServer.Builder(BaseApplication.getBaseApplication())
                    .cacheDirectory(BaseApplication.getBaseApplication().getCacheDir())//缓存路径
                    .maxCacheFilesCount(100)//最大缓存文件数量
                    .maxCacheSize(1024 * 1024 * 1024)       // 最大缓存大小 1 Gb for cache
                    .build();
        }
        return proxy;
    }

    public static final void init() {
        IPUtils.start();
        getProxy();
        InstallObsever.getInstance();
    }
}
